<template>
  <el-container class="main_container">
    <!--头部布局-->
    <el-header>
      <div class="left_box">
        <!--左边logo和项目名称-->
        <img src="../assets/img/timg.gif">
        <span>新冠物资管理系统</span>
      </div>
      <div class="right_box">
        <!--右侧头像和登出-->
        <!--下拉菜单-->
        <el-dropdown>
          <img src="../assets/img/timg.gif">
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item icon="el-icon-house">系统首页</el-dropdown-item>
            <el-dropdown-item icon="el-icon-ship">交流讨论</el-dropdown-item>
            <el-dropdown-item icon="el-icon-switch-button">退出</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </div>
    </el-header>
    <el-container>
      <!--侧边栏-->
      <el-aside width="200px">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b">
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>导航一</span>
            </template>
            <el-menu-item-group>
              <template slot="title">分组一</template>
              <el-menu-item index="1-1">选项1</el-menu-item>
              <el-menu-item index="1-2">选项2</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group title="分组2">
              <el-menu-item index="1-3">选项3</el-menu-item>
            </el-menu-item-group>
            <el-submenu index="1-4">
              <template slot="title">选项4</template>
              <el-menu-item index="1-4-1">选项1</el-menu-item>
            </el-submenu>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main>Main</el-main>
    </el-container>
  </el-container>
</template>

<script>
  export default {
    name: 'main'
  }
</script>

<style lang="less" scoped>

  .main_container{
    height: 100%;
  }
  /*头部布局*/
  .el-header {
    background-color: #001529;
    display: flex;
    justify-content: space-between;
    padding-left: 0;
    color: #FFFFFF;
    align-items: center;
    font-size: 20px;

      .left_box{
      display: flex;
      align-items: center;

      img{
        width: 60px;
        height: 60px;
        margin: 0px 0px 10px 10px;
      }
      span{
        margin-left: 15px;
      }
    }
    .right_box{
      .el-dropdown>img{
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: #FFFFFF;
        background-size: contain;
      }
    }
  }
  /*左侧内容*/
  .el-aside {
    background-color: #001529;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  /*主体内容*/
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }

</style>
